package com.qf.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.qf.mapper.DtsAccountTraceMapper;
import com.qf.pojo.DtsAccountTrace;
import com.qf.pojo.DtsUser;
import com.qf.service.DtsAccountTraceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author Zwnan
 */
@Service
public class DtsAccountTraceServiceImpl implements DtsAccountTraceService {
    @Autowired
    private DtsAccountTraceMapper dtsAccountTraceMapper;

    @Override
    public IPage<DtsAccountTrace> selectByPage(Integer page, Integer limit, String sort, String order) {
        IPage<DtsAccountTrace> iPage = new Page<>(page, limit);
        QueryWrapper<DtsAccountTrace> wrapper = new QueryWrapper<>();
        return dtsAccountTraceMapper.selectPage(iPage,wrapper);
    }

    @Override
    public void approve(DtsAccountTrace dtsAccountTrace) {
        dtsAccountTraceMapper.updateById(dtsAccountTrace);
    }
}
